package cn.tedu.myboot331.mapper;

import cn.tedu.myboot331.vo.Emp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmpMapper {
    @Select("select *from myemp")
    List<Emp> select();

    @Delete("delete from myemp where id=#{id}")
    void delete(int id);

    @Insert("insert into myemp values(null,#{name},#{job},#{age},#{salary})")
    void insert(Emp emp);
}
